package com.lxt.cloud.testredis.controller;

import com.lxt.cloud.testredis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalTime;

@RestController
public class RedisController {
    @Resource
    RedisService redisService;
    @GetMapping("/testRedisSave")
    public void testSave(){
        redisService.saveLoginInfo();
    }

    @GetMapping("/saveLoginInfos")
    public void saveLoginInfos(){
        redisService.saveLoginInfos();
    }
}

